from datetime import datetime

from pydantic import BaseModel, Field
from schemas import GMT


class ProjectIn(BaseModel):
    name: str = Field(example='项目名称')
    version: str = Field(example='项目版本')
    description: str = Field(example='项目描述')
    createName: str = Field(example='创建者')
    updateName: str = Field(example='最后更新人')
    status: bool = Field(example=True)


class ProjectCreate(ProjectIn):
    pass


class ProjectUpdate(ProjectIn):
    pass


class ProjectOut(ProjectIn, GMT):
    id: int = Field(example='编号')

    class Config:
        orm_mode = True
